Repository navigation
fix(vscode): create settings.json on fresh profiles - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The VS Code target only processed a variant when
~/.config/Code*/User/settings.jsonalready existed. On a fresh profile with no saved settings,apply()silently skipped both Code and Code - Insiders, so VS Code stayed unthemed. This is not niri-specific: the niri shell does call theme-sync at startup and on palette changes; Hyprland only worked because its profile already had that file.Fix
User/directory, extension directory orcode/code-insidersbinary exists.User/settings.jsonif missing and write the normal theme block into it.[created]) so the engine output is clear.scripts/check.shthat asserts the missing file is created with the managed block.Validation
python3 -m compileall -q themesync,bash -n scripts/check.sh,scripts/check.sh(155 palettes, vscode mapping, vscode create: OK).~/.config/Code - Insiders/User/settings.jsonand applied thebrightlive tint; VS Code updated live (screenshot verified). The previously installed engine also processes the target now that the file exists.